home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gnome-vfs-2.0 / libgnomevfs / gnome-vfs-address.h next >
Encoding:
C/C++ Source or Header  |  2006-05-01  |  2.2 KB  |  64 lines

  1. /* gnome-vfs-address.h - Address functions
  2.  
  3.    Copyright (C) 2004 Christian Kellner
  4.  
  5.    The Gnome Library is free software; you can redistribute it and/or
  6.    modify it under the terms of the GNU Library General Public License as
  7.    published by the Free Software Foundation; either version 2 of the
  8.    License, or (at your option) any later version.
  9.  
  10.    The Gnome Library is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.    Library General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU Library General Public
  16.    License along with the Gnome Library; see the file COPYING.LIB.  If not,
  17.    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18.    Boston, MA 02111-1307, USA.
  19.  
  20. */
  21.  
  22. #ifndef GNOME_VFS_ADDRESS_H
  23. #define GNOME_VFS_ADDRESS_H
  24.  
  25. #include <libgnomevfs/gnome-vfs-result.h>
  26.  
  27. #include <glib.h>
  28. #include <glib-object.h>
  29. #ifndef G_OS_WIN32
  30. #include <sys/types.h>
  31. #include <sys/socket.h>
  32. #include <netdb.h>
  33. #else
  34. #include <winsock2.h>
  35. #undef interface
  36. #endif
  37.  
  38. G_BEGIN_DECLS
  39.  
  40. #define GNOME_VFS_TYPE_ADDRESS  (gnome_vfs_address_get_type ())
  41.  
  42. typedef struct _GnomeVFSAddress GnomeVFSAddress;
  43.  
  44. GType            gnome_vfs_address_get_type          (void);
  45.  
  46. GnomeVFSAddress *gnome_vfs_address_new_from_string   (const char      *address);
  47. GnomeVFSAddress *gnome_vfs_address_new_from_ipv4     (guint32          ipv4_address);
  48. GnomeVFSAddress *gnome_vfs_address_new_from_sockaddr (struct sockaddr *sa,
  49.                                             int              len);
  50.  
  51. int              gnome_vfs_address_get_family_type   (GnomeVFSAddress *address);
  52. char *           gnome_vfs_address_to_string         (GnomeVFSAddress *address);
  53. guint32          gnome_vfs_address_get_ipv4          (GnomeVFSAddress *address);
  54. struct sockaddr *gnome_vfs_address_get_sockaddr      (GnomeVFSAddress *address,
  55.                                             guint16          port,
  56.                                             int             *len);
  57.  
  58. GnomeVFSAddress *gnome_vfs_address_dup               (GnomeVFSAddress *address);
  59. void             gnome_vfs_address_free              (GnomeVFSAddress *address);
  60.  
  61. G_END_DECLS
  62.  
  63. #endif
  64.